{% load staticfiles %}
<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="{% static 'layui/css/font.css' %}">
        <link rel="stylesheet" href="{% static 'layui/css/xadmin.css' %}">
        <script src="{% static 'layui/lib/layui/layui.js' %}" charset="utf-8"></script>
        <script type="text/javascript" src="{% static 'layui/js/xadmin.js' %}"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">欢迎管理员：
                                <span class="x-red">{{ request.user }}</span>！当前时间:
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">数据统计</div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>立项数|实施项目数</h3>
                                        <p><cite>{{ add_project_count }}|{{ project_count }}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>审核意见</h3>
                                        <p>
                                            <cite>{{ opinions.count }}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>合同数量</h3>
                                        <p>
                                            <cite>{{ contracts.count }}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>知识库</h3>
                                        <p>
                                            <cite>67</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6 ">
                                    <a href="../timeline" class="x-admin-backlog-body">
                                        <h3>大事记|近1个月</h3>
                                        <p>
                                            <cite>{{ userWorks.count }}条|</cite></p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!-- <div class="layui-col-sm6 layui-col-md3">
                    <div class="layui-card">
                        <div class="layui-card-header">下载
                            <span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
                        <div class="layui-card-body  ">
                            <p class="layuiadmin-big-font">33,555</p>
                            <p>新下载
                                <span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
                            </p>
                        </div>
                    </div>
                </div> -->
                <!--信息表开始-->
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
                                <a href="/project/index/" class="layui-btn">全部工程</a>
                            {% for c in category %}
                                {% if c.name == search_word %}
                                <a href="?w={{ c.name }}" class="layui-btn">{{ c.name }}<span class="layui-badge">{{ c.addprojects.count }}</span></a>
                                {% else %}
                                <a href="?w={{ c.name }}" class="layui-btn layui-btn-primary layui-border-blue">{{ c.name }}<span class="layui-badge">{{ c.addprojects.count }}</span></a>
                                {% endif %}
                            {% endfor %}
                        </div>
                        <div class="layui-card-body">
                            <table class="layui-table" lay-skin="line">
                                <colgroup>
                                    <col width="250">
                                    <col>
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>立项名称</th>
                                        <th>实施项目列表</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for list in all_project.object_list %}
                                    <tr>
                                        <td>{{ list.tempname }}</td>
                                        <td>                                    
                                            {% for project in list.projects.all %}
                                            <span><button class="layui-btn layui-btn-sm">{{ project.resultclass.name }}</button>{{ project.projectname }}(完成时间{{ project.p_approvetime|date:'Y年m月d日' }})</span>
                                            <br>
                                            {% for workload in project.workloads.all %}
                                                <span>├{{ workload.get_worktype_display }}:{{ workload.holes }}孔、{{ workload.totals }}m</span>
                                                <br>
                                            {% endfor %}
                                            {% for opinion in project.opinions.all %}
                                            <span>├{{ opinion.examiner }}的{{ opinion.get_flow_display }}意见：{{ opinion.content }}</span><br>
                                            {% endfor %}
                                        {% endfor %}
                                        </td>
                                        <td></td>
                                    </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                        </div>
                        <div class="layui-collapse" lay-accordion="">
                            <div>
                                <div class="layui-card-body ">
                                    <div class="page">
                                        <!--分页开始-->
                                        <div>
                                            {% if all_project.has_previous %}
                                            <a class="prev"
                                                href="?{{ all_project.previous_page_number.querystring }}">&lt;&lt;</a>
                                            {% endif %}
                                            {% for page in all_project.pages %}
                                            {% if page %}
                                            {% ifequal page all_project.number %}
                                            <span class="current">{{ page }}</span>
                                            {% else %}
                                            <a class="num" href="?{{ page.querystring }}">{{ page }}</a>
                                            {% endifequal %}
                                            {% else %}
                                            <span class="num">...</span>
                                            {% endif %}
                                            {% endfor %}
                                            {% if all_project.has_next %}
                                            <a class="next"
                                                href="?{{ all_project.next_page_number.querystring }}">&gt;&gt;</a>
                                            {% endif %}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--信息表结束-->
                <!-- <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">系统信息</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                    <tr>
                                        <th>xxx版本</th>
                                        <td>1.0.180420</td></tr>
                                    <tr>
                                        <th>服务器地址</th>
                                        <td>x.xuebingsi.com</td></tr>
                                    <tr>
                                        <th>操作系统</th>
                                        <td>WINNT</td></tr>
                                    <tr>
                                        <th>运行环境</th>
                                        <td>Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9</td></tr>
                                    <tr>
                                        <th>PHP版本</th>
                                        <td>5.6.27</td></tr>
                                    <tr>
                                        <th>PHP运行方式</th>
                                        <td>cgi-fcgi</td></tr>
                                    <tr>
                                        <th>MYSQL版本</th>
                                        <td>5.5.53</td></tr>
                                    <tr>
                                        <th>ThinkPHP</th>
                                        <td>5.0.18</td></tr>
                                    <tr>
                                        <th>上传附件限制</th>
                                        <td>2M</td></tr>
                                    <tr>
                                        <th>执行时间限制</th>
                                        <td>30s</td></tr>
                                    <tr>
                                        <th>剩余空间</th>
                                        <td>86015.2M</td></tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div> -->

                <div class="layui-col-md12">
                    <blockquote class="layui-elem-quote layui-quote-nm">勘测院@2020</blockquote></div>
            </div>
        </div>
        </div>
    </body>
</html>